package com.download.web.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

/**
 * @description: 文章评论
 * @author: cmy
 * @create: 2019-02-21 19:39
 **/
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class BusArticleComment {
    @TableId(type = IdType.AUTO)
    private Integer id;
    //评论内容
    private String content;
    //评论用户id
    private Integer userId;
    //评论时间
    private Date createTime;
    //上级评论id
    private Integer parentId;
    //评论的文章id
    private Integer articleId;

    //评论文章对象类型 0 普通文章，1关于我们评论，2 赞助我们的评论
    private Integer objType;

    private Boolean states;

    public BusArticleComment(String content, Integer userId, Integer parentId, Integer articleId,Integer objType,Boolean states) {
        this.content = content;
        this.userId = userId;
        this.parentId = parentId;
        this.articleId = articleId;
        this.objType=objType;
        this.createTime=new Date();
        this.states = states;
    }
}
